<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="/static/js/jquery-1.12.0.min.js" type="text/javascript"></script>
<script src="/static/js/layer.js" type="text/javascript"></script>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>数据去重工具</title>
<link rel="shortcut icon"
	href="http://oqly8bu50.bkt.clouddn.com/%E5%8E%BB%E9%87%8D.png"
	type="image/x-icon">
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description"
	content="Demo for the tutorial: Styling and Customizing File Inputs the Smart Way" />
<meta name="keywords"
	content="cutom file input, styling, label, cross-browser, accessible, input type file" />
<meta name="author" content="Osvaldas Valutis for Codrops" />
<link rel="shortcut icon" href="favicon.ico">
<link rel="stylesheet" type="text/css"
	href="../../../static/css/normalize.css" />
<link rel="stylesheet" type="text/css"
	href="../../../static/css/demo.css" />
<link rel="stylesheet" type="text/css"
	href="../../../static/css/component.css" />

<script>
	(function(e, t, n) {
		var r = e.querySelectorAll("html")[0];
		r.className = r.className.replace(/(^|\s)no-js(\s|$)/, "$1js$2")
	})(document, window, 0);
</script>
</head>

<body>
	<div class="container">
		<header class="codrops-header">
		<div class="codrops-links">
			<a class="codrops-icon codrops-icon--prev" href="#" title="文件去重"><span>返回</span></a>
			<a class="codrops-icon codrops-icon--drop" href="#" title="文件去重"><span>文件去重
			</span></a>
		</div>
		<h1>文件手机号码去重</h1>
		<p>
			操作方法: <strong><a href="#">1、确保excel中第1列为企业，第2列为姓名，第3列为手机号码，第4列为备注  2、点击选择文件  3、点击上传文件  4、点击导出文件，您就可以得到去重后的手机号码(每次300条)</a></strong>
		</p>
		</header>

		<div class="content" style="display:flex;">
			<div class="box" style="flex:1;margin:0px;">
				<form id="form_choose" action="/excel/upload" method="post"
					enctype="multipart/form-data">
					<div >
						<input style="display: none;" type="file" name="exceldata"
							id="file-5" class="inputfile inputfile-4"
							data-multiple-caption="{count} files selected" multiple /> 
							<label for="file-5" style="padding:0px;"> 
							<figure > 
							<svg t="1531819174024" class="icon" style="" viewBox="0 0 1607 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4254" xmlns:xlink="http://www.w3.org/1999/xlink" width="313.8671875" height="200"><defs><style type="text/css"></style></defs><path d="M0 731.459874c0 144.991797 108.542977 265.294814 251.124331 288.522719l50.254084 4.017405 1004.351236 0 50.254084-4.017405C1498.419 996.754688 1606.961977 876.451671 1606.961977 731.459874c0-127.388259-83.854198-235.785148-200.943291-275.959198C1401.78215 203.207646 1189.809257 0 929.043154 0c-188.087595 0-350.755973 105.694272-428.474498 259.305228C463.827662 219.861616 410.651829 195.026749 351.486411 195.026749c-110.95342 0-200.870247 87.360297-200.870247 195.026749 0 28.121835 6.135673 54.855838 17.092232 79.033312C68.368928 516.857407 0 616.416006 0 731.459874zM803.480989 365.218631l292.174905 328.696768-147.037021 0L948.618873 1022.612167 657.028317 1022.612167 657.028317 693.915399 511.306084 693.915399 803.480989 365.218631z" p-id="4255" data-spm-anchor-id="a313x.7781069.0.i3" class="selected" fill="#ffffff"></path></svg>
							</figure> <span class="span1">选择文件</span>
						</label>
					</div>
					<div>
						<input display="none"
							style=" margin-top: 20px;position: static; background: #d13b4f; color: #dfc8ca; box-shadow: 1px 1px 1px #888888; border-radius: 4px; width: 100px; clear: both; white-space: normal; height: 30px; border: 1px solid #00000000; text-align: center;"
							type="submit" value="上传文件" />
					</div>
					
				</form>
			</div>
			<div class="box"  style="flex:1;width:50%;margin:0px;">
			
					<div>
						<input style="display: none;" type="input" name="exceldata"
							id="null" class="inputfile inputfile-4" />
							 <label for="f" style="padding:0px;" onclick="exportExcel()" class="label_2"> <figure>
							<svg t="1531819196329" class="icon" style="" viewBox="0 0 1614 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5555" xmlns:xlink="http://www.w3.org/1999/xlink" width="315.234375" height="200"><defs><style type="text/css"></style></defs><path d="M0 734.340877c0 145.562876 108.970496 266.339731 252.113435 289.659123l552.18562 0L513.319966 696.648525l147.616156 0L660.936121 366.657118l292.665712 0 0 329.991406L1099.971355 696.648525l-290.979089 327.351475 552.18562 0C1504.320825 1000.680607 1613.291321 879.903753 1613.291321 734.340877c0-127.890003-84.184474-236.713836-201.734746-277.046119C1407.303351 204.008021 1194.49556 0 932.702378 0c-188.828416 0-352.137496 106.11057-430.162131 260.326554C465.65454 220.727585 412.269264 195.794901 352.944142 195.794901c-111.390433 0-201.661415 87.704383-201.661415 195.794901 0 28.232598 6.15984 55.071899 17.159553 79.3446C68.638213 518.893154 0 618.843884 0 734.340877z" p-id="5556" data-spm-anchor-id="a313x.7781069.0.i6" class="selected" fill="#ffffff"></path></svg>
							</figure> <span class="span2">点击下载</span>
						</label>
					</div>
					
					<div onclick="exportExcel()" class="button_center"
						style="position: relative; background: #d13b4f; color: #dfc8ca; box-shadow: 1px 1px 1px #888888; border-radius: 4px; width: 100px; clear: both; left: 50%; margin-top: 20px; margin-left: -50px; white-space: normal; text-align: center; line-height: 30px; height: 30px; border: 1px solid #00000000;">下载数据</div>
			</div>
		</div>
			<footer style="margin-bottom:48px;margin-top:4px; width:100%;text-align:center;">made by <a href="#"
				target="_blank">bizhiwei</a>.</footer>
	</div>
	</div>
</body>

<script type="text/javascript">
	var flag = 0;//是否选择文件的标志位
	function exportExcel() {
		$('.button_center').removeAttr('onclick');
		$('.label_2').removeAttr('onclick');
		window.location.href = "/excel/exportExcel";
	}
	$("form").submit(function(e){
		if(flag==0){
				layer.msg("请先选择文件");
				return false;
			}
		});
	window.onload = function() {
		$("#file-5").bind('change',function() {
							var file = $(this).val();
							if (file.length > 0) {
								var suffix = file.substr(file.lastIndexOf("\\") + 1);
								$(".span1").text(suffix);
								flag = 1;
							}
						});
	}
</script>
</html>

